class NewStructure < ActiveRecord::Migration
	
  def self.up

		alter_table :users do |t|
      t.boolean :is_admin
		end
		
		drop_table :comments
		drop_table :votes
		
  end

  def self.down
		
		create_table :comments do |t|
      t.integer :user_id
      t.integer :post_id
      t.text :body

      t.timestamps
    end

		create_table :votes do |t|
      t.integer :user_id
      t.integer :comment_id
      t.integer :rank

      t.timestamps
    end

		alter_table :users do |t|
      drop_column :is_admin
		end

  end
	
end
